package DistSys;

import java.awt.Color;

import Element.AbsElem;
import Element.Geom.AbsElemGeom;


public class SysConst {

    /**
     * Sets the debugging verbosity. 0 for no debugging; >=1 for debugging
     */
    public static final int DEBUG_MODE = 1;

    public static final int iAceessLevelIndex = 15;//""";
    public static       int iAccessLevel = 0;

    public static final String PAD_EXT = ".pad";
    public static final String MDB_EXT = ".mdb";

    public static final String sEndOfLine = System.getProperty("line.separator");

    public static final int NODE_SIZE = 3;  // diameter of node-- even numbers suggested here
    public static final int SNAP_SIZE = 4;  //2;
    public static final int UNIT_MILE=0, UNIT_KM=1, UNIT_KFEET=2, UNIT_FEET=3;
    public static final double SCALEBAR_LENGTH = 64.0;


    public static final String[] unitStrings = new String[] {
        "mi", "km", "kft", "ft" };
    public static final int[] unitFracDigits = new int[] {
        2,    2,    2,     1 };

    public static int progress=0;
    public static String progressMsg;

    public static final String[] ssTemplType = new String[] {
        "Cable",                           //  0
        "Line",                            //  1
        "Load",                            //  2
        "Misc",                            //  3
        "Protection",                      //  4
        "Source",                          //  5
        "Switch",                          //  6
        "Transformer",                     //  7
    };
    public static final int TEMPLTYPE_LINE        =  0;
    public static final int TEMPLTYPE_CABLE       =  1;
    public static final int TEMPLTYPE_LOAD        =  2;
    public static final int TEMPLTYPE_PROTECTION  =  3;
    public static final int TEMPLTYPE_SOURCE      =  4;
    public static final int TEMPLTYPE_SWITCH      =  5;
    public static final int TEMPLTYPE_TRANSFORMER =  6;
    // reserved for future use                       7
    // reserved for future use                       8
    public static final int TEMPLTYPE_MISC        =  9;

    public static final int MAX_TEMPLTYPE         = 10;

    public static final String[] ssGenericTemplName = new String[] {
        "Generic Line",
        "Generic Cable",
        "Generic Load",
        "Generic Shunt Capacitor",
        "Generic Distributed Generation",
        "Generic Motor",
        "Generic Breaker",
        "Generic Fuse",
        "Generic Sectionalizer",
        "Generic Surge Arrester",
        "Generic Recloser",
        "Generic Source",
        "Generic Switch",
        "Generic Transformer",
        "Generic Regulator",
        "Generic Current Transformer",
        "Generic Voltage Transformer",
        "Generic Bus",
        "Generic Series Capacitor",
        "Generic Reactor",
        "Generic Group",
    };

    public static final String[] ssType = new String[] {
        "[All]",                           //  0
        "[None]",                          //  1
        "Breaker",                         //  2
        "Bus",                             //  3
        "Cable",                           //  4
        "Capacitor",                       //  5
        "Current Transformer",             //  6
        "Distributed Generation",          //  7
        "Drawout Breaker",                 //  8
        "Fuse",                            //  9
        "Grounding Switch",                // 10
        "Group",                           // 11
        "Line",                            // 12
        "Load",                            // 13
        "Motor",                           // 14
        "Reactor",                         // 15
        "Recloser",                        // 16
        "Regulator",                       // 17
        "Sectionalizer",                   // 18
        "Series Capacitor",                // 19
        "Source",                          // 20
        "Surge Arrester",                  // 21
        "Switch",                          // 22
        "Transfer Switch",                 // 23
        "Transformer",                     // 24
        "Voltage Transformer",             // 25
        "3winding Transformer",            // 26
    };
    public static final String[] ssTypeEngine = new String[] {
        "All",                             // TYPE_ALL                  0
        "None",                            // TYPE_NONE                 1
        "Line",                            // TYPE_LINE                 2
        "",                                // reserved for future use   3
        "",                                // reserved for future use   4
        "Cable",                           // TYPE_CABLE                5
        "",                                // reserved for future use   6
        "",                                // reserved for future use   7
        "Load",                            // TYPE_LOAD                 8
        "Capacitor",                       // TYPE_CAPACITOR            9
        "Distributed_Generation",          // TYPE_DIST_GEN            10
        "Motor",                           // TYPE_MOTOR               11
        "",                                // reserved for future use  12
        "",                                // reserved for future use  13
        "Breaker",                         // TYPE_BREAKER             14
        "Drawout_Breaker",                 // TYPE_DRT_BREAKER         15
        "Fuse",                            // TYPE_FUSE                16
        "Sectionalizer",                   // TYPE_SECTIONIZER         17
        "Surge_Arrester",                  // TYPE_ARRESTER            18
        "Recloser",                        // TYPE_RECLOSER            19
        "",                                // reserved for future use  20
        "",                                // reserved for future use  21
        "Source",                          // TYPE_SOURCE              22
        "",                                // reserved for future use  23
        "",                                // reserved for future use  24
        "Switch",                          // TYPE_SWITCH              25
        "Transfer_Switch",                 // TYPE_SWITCH3             26
        "Grounding_Switch",                // TYPE_SWITCH_GND          27
        "",                                // reserved for future use  28
        "",                                // reserved for future use  29
        "Transformer",                     // TYPE_TRANSFORMER         30
        "Regulator",                       // TYPE_REGULATOR           31
        "Current_Transformer",             // TYPE_CURR_TX             32
        "Voltage_Transformer",             // TYPE_VOLT_TX             33
        "",                                // TYPE_3W_TX               34
        "",                                // reserved for future use  35
        "",                                // reserved for future use  36
        "Bus",                             // TYPE_BUS                 37
        "Series_Capacitor",                // TYPE_SERIES_CAP          38
        "Reactor",                         // TYPE_REACTOR             39
        "Group",                           // TYPE_GROUP               40
    };

    public static final int TYPE_BG_IMAGE    =  -2;   //not used
    public static final int TYPE_BG_LINE     =  -1;   //not used

    public static final int TYPE_ALL         =  0;
    public static final int TYPE_NONE        =  1;
    public static final int TYPE_LINE        =  2;
    // reserved for future use                  3
    // reserved for future use                  4
    public static final int TYPE_CABLE       =  5;
    // reserved for future use                  6
    // reserved for future use                  7
    public static final int TYPE_LOAD        =  8;
    public static final int TYPE_CAPACITOR   =  9;
    public static final int TYPE_DIST_GEN    = 10;
    public static final int TYPE_MOTOR       = 11;
    // reserved for future use                 12
    // reserved for future use                 13
    public static final int TYPE_BREAKER     = 14;
    public static final int TYPE_DRT_BREAKER = 15;
    public static final int TYPE_FUSE        = 16;
    public static final int TYPE_SECTIONIZER = 17;
    public static final int TYPE_ARRESTER    = 18;
    public static final int TYPE_RECLOSER    = 19;
    // reserved for future use                 20
    // reserved for future use                 21
    public static final int TYPE_SOURCE      = 22;
    // reserved for future use                 23
    // reserved for future use                 24
    public static final int TYPE_SWITCH      = 25;
    public static final int TYPE_SWITCH3     = 26;
    public static final int TYPE_SWITCH_GND  = 27;
    // reserved for future use                 28
    // reserved for future use                 29
    public static final int TYPE_TRANSFORMER = 30;
    public static final int TYPE_REGULATOR   = 31;
    public static final int TYPE_CURR_TX     = 32;
    public static final int TYPE_VOLT_TX     = 33;
    public static final int TYPE_3W_TX       = 34;
    // reserved for future use                 35
    // reserved for future use                 36
    public static final int TYPE_BUS         = 37;
    public static final int TYPE_SERIES_CAP  = 38;
    public static final int TYPE_REACTOR     = 39;
    public static final int TYPE_GROUP       = 40;

    public static final int MAX_TYPE         = 41;



    //Strings associated with AbsElem.adData[] array
    //For display in the listbox/comboBox in GUI
    //Also, same as in MDB
    public static final String[] ssDataField = new String[] {
        "[None]",                          // AbsElem.DATA_NONE
        "Base Font Size",                  // AbsElem.DATA_FONT_SIZE
        "Constant Current: Amps",          // AbsElem.DATA_CONST_CURR
        "Constant Power: kVA",             // AbsElem.DATA_CONST_POWER
        "Capital Cost: $",                 // AbsElem.DATA_CAPITAL_COST
        "Cost per Critical Sag: $",        // AbsElem.DATA_COST_PER_SAG
        "Cost per Interruption: $/kW",     // AbsElem.DATA_COST_PER_INT_KW
        "Cost per Interruption: $/kWh",    // AbsElem.DATA_COST_PER_INT_KWH
        "Critical Voltage Sag Level",      // AbsElem.DATA_VOLT_SAG_LEVEL
        "Customers",                       // AbsElem.DATA_CUSTOMERS
        "In Optimization Library",         // AbsElem.DATA_IN_OPT_LIB
        "Instantaneous Blocked",           // AbsElem.DATA_INST_BLOCKED
        "Lagging = 0, Leading = 1",        // AbsElem.DATA_IS_LEADING
        "Layer",                           // AbsElem.DATA_LAYER
        "Length",                          // AbsElem.DATA_LENGTH
        "Maintenance Duration: hr",        // AbsElem.DATA_MAINT_DUR
        "Maintenance Rate: /yr",           // AbsElem.DATA_MAINT_RATE
        "Mean Time To Repair: hr",         // AbsElem.DATA_MTTR
        "Mean Time To Switch: hr",         // AbsElem.DATA_MTTS
        "Normally Open",                   // AbsElem.DATA_NORM_OPEN
        "# Boost Taps",                    // AbsElem.DATA_NUM_BOOST
        "# Buck Taps",                     // AbsElem.DATA_NUM_BUCK
        "O & M Cost: $/yr",                // AbsElem.DATA_OM_COST
        "Open Circuits: /yr",              // AbsElem.DATA_OPEN_CKT
        "Operational Failures: pu",        // AbsElem.DATA_OPER_FAIL
        "Optimizable",                     // AbsElem.DATA_OPTIMIZABLE
        "Phases (0-3)",                    // AbsElem.DATA_PHASE
        "PF of Constant Current",          // AbsElem.DATA_PF_CONST_CURR
        "PF of Constant Power",            // AbsElem.DATA_PF_CONST_POWER
        "Rated Current: A",                // AbsElem.DATA_RATED_CURR
        "Rated Power: kVA",                // AbsElem.DATA_RATED_POWER
        "Reactance: Ohms",                 // AbsElem.DATA_REACTANCE
        "Reclosing Relay",                 // AbsElem.DATA_RECLOSING
        "Resistance: Ohms",                // AbsElem.DATA_RESISTANCE
        "Shunt Conductance: Mhos",         // AbsElem.DATA_SHUNT_COND
        "Shunt Suceptance: Mhos",          // AbsElem.DATA_SHUNT_SUCEP
        "Source Voltage: kV",              // AbsElem.DATA_SRC_VOLT
        "Study Area",                      // AbsElem.DATA_STUDY_AREA
        "Sustained Faults: /yr",           // AbsElem.DATA_SUST_FAULT
        "Tap Boost Trigger: kV",           // AbsElem.DATA_BOOST_TRIG
        "Tap Buck Trigger: kV",            // AbsElem.DATA_BUCK_TRIG
        "Tap Ratio: pu",                   // AbsElem.DATA_TAP_RATIO
        "Temporary Faults: /yr",           // AbsElem.DATA_TEMP_FAULT
        "Transformer Ratio: pu",           // AbsElem.DATA_TXFM_RATIO
        "Upgrade Cost: $",                 // AbsElem.DATA_UPGRADE_COST
        "Year",                            // AbsElem.DATA_YEAR
        "Zone",                            // AbsElem.DATA_ZONE
        "Zone Buffer 0",                   // AbsElem.DATA_ZONE_BUFFER0
        "Zone Buffer 1",                   // AbsElem.DATA_ZONE_BUFFER2
        "Zone Buffer 2",                   // AbsElem.DATA_ZONE_BUFFER4
        "Zone Buffer 3",                   // AbsElem.DATA_ZONE_BUFFER1
        "Zone Buffer 4",                   // AbsElem.DATA_ZONE_BUFFER3
        //added by Yanli
        "GenBus",                   	   // AbsElem.DATA_GEN_BUS
        "Pg",                   	       // AbsElem.DATA_GEN_PG
        "Qg",                  			   // AbsElem.DATA_GEN_QG
        "Qmax",                  	 	   // AbsElem.DATA_GEN_QMAX
        "Qmin",                  		   // AbsElem.DATA_GEN_QMIN
        "Vg",                   		   // AbsElem.DATA_GEN_VG
        "mBase",                   	       // AbsElem.DATA_GEN_MBASE
        "status",                 		   // AbsElem.DATA_GEN_STATUS
        "Pmax",                  		   // AbsElem.DATA_GEN_PMAX
        "Pmin",                  		   // AbsElem.DATA_GEN_PMIN
        "GenBid",                  		   // AbsElem.DATA_GEN_BID

    };

    public static final String[] ssResultField = new String[] {
        "[None]",                          // RES_NONE
        "Blocked Operations: /yr",         // RES_BLOCK_OPER
        "Capacity Constrained: /yr",       // RES_CAPA_CONS
        "Capacity Constrained: kVA/yr",    // RES_CAPA_CONS_KVA
        "Capital Delivery: $/kVA/yr",      // RES_CAPITAL_DELIV
        "Critical Volt Sags: /yr",         // RES_VOLT_SAGS
        "Critical Volt Sags(Node 1): /yr", // RES_VOLT_SAGS_NODE1
        "Current Angle: degree",           // RES_CURR_ANG
        "Current Flow: Amps",              // RES_CURR_MAG
        "Load Losses: $/kVA/yr",           // RES_LOAD_LOSS
        "Loading: %Ampacity",              // RES_CURR_LOADING
        "Loading: %kVA rating",            // RES_KVA_RATING
        "MAIFI Contribution",              // RES_MAIFI
        "Momentary Interruptions: /yr",    // RES_MOMENT_INT
        "Net Delivery Cost: $/kVA/yr",     // RES_NET_DELIV_COST
        "No Load Losses: $/kVA/yr",        // RES_NO_LOAD_LOSS
        "Nominal Voltage: kV",             // RES_NOMINAL_VOLT
        "O&M Delivery: $/kVA/yr",          // RES_OM_DELIV
        "Outage Duration: hr/yr",          // RES_OUT_DUR
        "Power Factor",                    // RES_PF
        "Power Flow: kVA",                 // RES_KVA_FLOW
        "Query Score:",                    // RES_QUERY_SCORE
        "Query Score: %",                  // RES_QUERY_SCORE_PERC
        "Reclosing Operations: /yr",       // RES_RECLOSE_OPER
        "Reversed Flow: /yr",              // RES_REVERSED_FLOW
        "SAG Contribution",                // RES_SAG
        "SAIDI Contribution",              // RES_SAIDI
        "SAIFI Contribution",              // RES_SAIFI
        "Short Circuit Current: kA",       // RES_SHORTCIRC_CURR
        "Sustained Interruptions: /yr",    // RES_SUST_INT
        "Switching Operations: /yr",       // RES_SWT_OPER
        "Tap Position",                    // RES_TAP_POS
        "Tripping Operations: /yr",        // RES_TRIP_OPER
        "Voltage: kV",                     // RES_VOLT_MAG
        "Voltage (Node 1): kV",            // RES_VOLT_MAG_NODE1
        "Voltage Angle: degrees",          // RES_VOLT_ANG
        "Voltage Angle (Node1): degrees",  // RES_VOLT_ANG_NODE1
        "Voltage Drop: %",                 // RES_VOLT_DROP
        "Voltage sag on target: p.u.",     // RES_VOLT_SAG_ON_TGT
        //VSA: Violations due to Security Analysis
        "VSA-Protection Zone",             // RES_PROTECT_ZONE
        "VSA-Momentary Int. (SA): /yr",    // RES_SA_MOMENT_INT
        "VSA-Sustained Int. (SA): /yr",    // RES_SA_SUST_INT
        "VSA-Outage Duration (SA): hr/yr", // RES_SA_DUR_SI
        "VSA-Momentary Overloads: /yr",    // RES_OLV_MI
        "VSA-Sustained Overloads: /yr",    // RES_OLV_SI
        "VSA-Overload Duration: /yr",      // RES_OLV_DUR_SI
        "VSA-Momentary Undervoltages: /yr",// RES_UVV_MI
        "VSA-Sustained Undervoltages: /yr",// RES_UVV_SI
        "VSA-Undervoltage Duration: /yr",  // RES_UVV_SI
    };


    // order and number of shading colors is defined here
    public static final Color[] shadingColors = new Color[] {
        Color.gray,            // 0
        Color.black,           // 1
        Color.blue,            // 2
        new Color(255,51,255), // 3 (pink)
        Color.green,           // 4
        Color.red,             // 5
        Color.cyan,            // 6
        Color.orange,          // 7
    };


    public SysConst() { }

    public static int mapUnitFromStringToInt(String unit) throws Exception{
        for(int i=0; i<SysConst.unitStrings.length; i++){
            if( unit.equalsIgnoreCase( SysConst.unitStrings[i] )) {
                return i;
            }
        }//end of for loop

        //error occured here; should throw exception
        throw new Exception("Error Occured @ mapUnitFromStringToInt()");
    }//end of mapUnitFromStringToInt(String)

    public static boolean isDataPerturbable(int iIndexOfValue) {
        if (iIndexOfValue == AbsElem.DATA_NONE ||
            iIndexOfValue == AbsElem.DATA_FONT_SIZE ||
            iIndexOfValue == AbsElem.DATA_IN_OPT_LIB ||
            iIndexOfValue == AbsElem.DATA_INST_BLOCKED ||
            iIndexOfValue == AbsElem.DATA_LAYER ||
            iIndexOfValue == AbsElem.DATA_IS_LEADING ||
            iIndexOfValue == AbsElem.DATA_NORM_OPEN ||
            iIndexOfValue == AbsElem.DATA_OPTIMIZABLE ||
            iIndexOfValue == AbsElem.DATA_PHASE ||
            iIndexOfValue == AbsElem.DATA_RECLOSING ||
            iIndexOfValue == AbsElem.DATA_STUDY_AREA ||
            iIndexOfValue == AbsElem.DATA_YEAR ||
            iIndexOfValue == AbsElem.DATA_ZONE_BUFFER0 ||
            iIndexOfValue == AbsElem.DATA_ZONE_BUFFER1 ||
            iIndexOfValue == AbsElem.DATA_ZONE_BUFFER2 ||
            iIndexOfValue == AbsElem.DATA_ZONE_BUFFER3 ||
            iIndexOfValue == AbsElem.DATA_ZONE_BUFFER4) {
            return false;
        } else {
            return true;
        }
    }

    public static int mapIndexToTemplType(int index) {
        switch(index) {
            case 0: return TEMPLTYPE_CABLE;
            case 1: return TEMPLTYPE_LINE;
            case 2: return TEMPLTYPE_LOAD;
            case 3: return TEMPLTYPE_MISC;
            case 4: return TEMPLTYPE_PROTECTION;
            case 5: return TEMPLTYPE_SOURCE;
            case 6: return TEMPLTYPE_SWITCH;
            case 7: return TEMPLTYPE_TRANSFORMER;
            default: return -1;
        }
    }

    public static int mapStringToTemplType(String s) {
        for (int i = 0; i < ssTemplType.length; i++) {
            if (s.equals(ssTemplType[i]))
                return mapIndexToTemplType(i);
        }
        return -1;
    }

    public static int mapTemplTypeToIndex(int templType) {
        switch(templType) {
            case TEMPLTYPE_CABLE:       return 0;
            case TEMPLTYPE_LINE:        return 1;
            case TEMPLTYPE_LOAD:        return 2;
            case TEMPLTYPE_MISC:        return 3;
            case TEMPLTYPE_PROTECTION:  return 4;
            case TEMPLTYPE_SOURCE:      return 5;
            case TEMPLTYPE_SWITCH:      return 6;
            case TEMPLTYPE_TRANSFORMER: return 7;
            default: return -1;
        }
    }

    public static int mapTypeToTemplType(int type) {
        switch(type) {
            case TYPE_LINE:
                return TEMPLTYPE_LINE;
            case TYPE_CABLE:
                return TEMPLTYPE_CABLE;
            case TYPE_LOAD:
            case TYPE_CAPACITOR:
            case TYPE_DIST_GEN:
            case TYPE_MOTOR:
                return TEMPLTYPE_LOAD;
            case TYPE_BREAKER:
            case TYPE_DRT_BREAKER:
            case TYPE_FUSE:
            case TYPE_SECTIONIZER:
            case TYPE_ARRESTER:
            case TYPE_RECLOSER:
                return TEMPLTYPE_PROTECTION;
            case TYPE_SOURCE:
                return TEMPLTYPE_SOURCE;
            case TYPE_SWITCH:
            case TYPE_SWITCH3:
            case TYPE_SWITCH_GND:
                return TEMPLTYPE_SWITCH;
            case TYPE_TRANSFORMER:
            case TYPE_REGULATOR:
            case TYPE_CURR_TX:
            case TYPE_VOLT_TX:
            case TYPE_3W_TX:
                return TEMPLTYPE_TRANSFORMER;
            case TYPE_BUS:
            case TYPE_SERIES_CAP:
            case TYPE_REACTOR:
            case TYPE_GROUP:
                return TEMPLTYPE_MISC;
            case TYPE_ALL:
            case TYPE_NONE:
            default:
                return -1;
        }
    }

    public static int mapIndexToType(int index) {
        switch(index) {
            case  0: return TYPE_ALL;
            case  1: return TYPE_NONE;
            case  2: return TYPE_BREAKER;
            case  3: return TYPE_BUS;
            case  4: return TYPE_CABLE;
            case  5: return TYPE_CAPACITOR;
            case  6: return TYPE_CURR_TX;
            case  7: return TYPE_DIST_GEN;
            case  8: return TYPE_DRT_BREAKER;
            case  9: return TYPE_FUSE;
            case 10: return TYPE_SWITCH_GND;
            case 11: return TYPE_GROUP;
            case 12: return TYPE_LINE;
            case 13: return TYPE_LOAD;
            case 14: return TYPE_MOTOR;
            case 15: return TYPE_REACTOR;
            case 16: return TYPE_RECLOSER;
            case 17: return TYPE_REGULATOR;
            case 18: return TYPE_SECTIONIZER;
            case 19: return TYPE_SERIES_CAP;
            case 20: return TYPE_SOURCE;
            case 21: return TYPE_ARRESTER;
            case 22: return TYPE_SWITCH;
            case 23: return TYPE_SWITCH3;
            case 24: return TYPE_TRANSFORMER;
            case 25: return TYPE_VOLT_TX;
            case 26: return TYPE_3W_TX;
            default: return -1;
        }
    }

    public static int mapTypeToIndex(int type) {
        switch(type) {
            case TYPE_ALL:         return  0;
            case TYPE_NONE:        return  1;
            case TYPE_BREAKER:     return  2;
            case TYPE_BUS:         return  3;
            case TYPE_CABLE:       return  4;
            case TYPE_CAPACITOR:   return  5;
            case TYPE_CURR_TX:     return  6;
            case TYPE_DIST_GEN:    return  7;
            case TYPE_DRT_BREAKER: return  8;
            case TYPE_FUSE:        return  9;
            case TYPE_SWITCH_GND:  return 10;
            case TYPE_GROUP:       return 11;
            case TYPE_LINE:        return 12;
            case TYPE_LOAD:        return 13;
            case TYPE_MOTOR:       return 14;
            case TYPE_REACTOR:     return 15;
            case TYPE_RECLOSER:    return 16;
            case TYPE_REGULATOR:   return 17;
            case TYPE_SECTIONIZER: return 18;
            case TYPE_SERIES_CAP:  return 19;
            case TYPE_SOURCE:      return 20;
            case TYPE_ARRESTER:    return 21;
            case TYPE_SWITCH:      return 22;
            case TYPE_SWITCH3:     return 23;
            case TYPE_TRANSFORMER: return 24;
            case TYPE_VOLT_TX:     return 25;
            case TYPE_3W_TX:       return 26;
            default:               return -1;
        }
    }

    public static final int mapDataIndexFromValueToDisplay(int index) {
        return index+1;
    }
    public static final int mapDataIndexFromDisplayToValue(int index) {
        return index-1;
    }

    public static final int mapResultIndexFromValueToDisplay(int index) {
        return index+1;
    }
    public static final int mapResultIndexFromDisplayToValue(int index) {
        return index-1;
    }

    public static final String getDataFieldFromValueIndex(int index) {
        return ssDataField[mapDataIndexFromValueToDisplay(index)];
    }
    public static final String getDataFieldFromDisplayIndex(int index) {
        return ssDataField[index];
    }

    public static final String getResultFieldFromValueIndex(int index) {
        return ssResultField[mapResultIndexFromValueToDisplay(index)];
    }
    public static final String getResultFieldFromDisplayIndex(int index) {
        return ssResultField[index];
    }
}
